<template>
  <div class="tinymcClass">
    <span>商品介绍</span>
    <Tinymce v-model="dialogBindData.description"/>
    <span>移动端商品介绍</span>
    <Tinymce v-model="dialogBindData.mdescription"/>
    <span>包装信息</span>
    <Tinymce v-model="dialogBindData.packInfo"/>
    <span>售后信息</span>
    <Tinymce v-model="dialogBindData.afterSaleInfo"/>
  </div>
</template>

<script>
import Tinymce from '../../../components/Tinymce'
export default {
  components: {
    Tinymce
  },
  /* eslint-disable vue/require-prop-types */
  props: ['type', 'editorData'],
  data() {
    return {
      dialogBindData: {
        description: '',
        mdescription: '',
        packInfo: '',
        afterSaleInfo: ''
      }
    }
  },
  beforeMount() {
    if (this.type !== 1) {
      this.dialogBindData.description = this.editorData.description
      this.dialogBindData.mdescription = this.editorData.mdescription
      this.dialogBindData.packInfo = this.editorData.packInfo
      this.dialogBindData.afterSaleInfo = this.editorData.afterSaleInfo
    }
  },
  methods: {
    goodDescription() {
      this.$emit('gooddescribe', this.dialogBindData)
    }
  }
}
</script>

<style type="text/scss" lang="scss" scoped>
  .tinymcClass{
    padding: 20px 40px;
    span{
      font-size:16px;
      color: #333;
      font-weight: bold;
      margin: 10px 0;
      display: block;
    }
  }
</style>
